package com.maventools.domain;

import lombok.*;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.net.URL;
import java.util.ArrayList;
import java.util.List;

/**
 * @BelongsProject: maventools
 * @BelongsPackage: com.maventools.domain
 * @Author: Layla
 * @CreateTime: 2025-04-19  12:21
 * @Description: 设置文件实体类
 * @Version: 1.0
 * @Since:Java17
 */


@Component
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Configuration {
    //本地仓库地址
    private String localRepository;
    private List<String> pluginGroups = new ArrayList<>();
    private List<Proxy> proxies = new ArrayList<>();
    private List<Mirror> mirrors = new ArrayList<>();
    private List<Server> servers = new ArrayList<>();
    private List<Profile> profiles = new ArrayList<>();
    /**
     * @Description: 镜像
     * @param
     * @return:
     * @Author:  Layila
     * @date:  2025/5/6 17:18
     */

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Mirror {
        private String id;
        private String mirrorOf;
        private URL url;
    }
/**
 * @Description: 服务器实体类
 * @param null
 * @return:
 * @Author:  Layila
 * @date:  2025/5/6 17:18
 */

    @Data
    public static class Server {
        private String id;
        private String userName;
        private String passWord;
    }
/**
 * @Description: 代理
 * @param null
 * @return:
 * @Author:  Layila
 * @date:  2025/5/6 17:18
 */

    @Data
    public static class Proxy {
        private String id;
        private boolean active;
        private String procotol = "http";
        private String userName;
        private String passWord;
        private String Port;
        private String host;

    }
}
